package epoch.game.core.message;

import epoch.game.core.buffer.IBuffer;

/**
 * 消息编码解码接口
 * @author will
 *
 * @param <S>
 * @param <R>
 */
public interface IMsgCodec<S, R> {
	
	byte[] encode(IBuffer buffer, S s);
	
	R decode(IBuffer buffer, int pos);
	
}
